console.log(curday('/'));
console.log(curday('-'));
Output :
"11/13/2014"
"11-13-2014"
function curday(separator){
    var date = new Date();
    var day = date.getDate();
    var month = date.getMonth() + 1;
    var year = date.getFullYear();
    if(separator){
        return day + separator + month + separator + year;
    }else{
        return day + '/' + month + '/' + year;
    }
}